package com.example.demo.api;

import com.example.demo.service.ProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Ricky
 * @date 2020/11/19
 */
@Api(tags = "shop测试controller")
@RestController
public class TestController {

    @Resource
    ProjectService projectService;

    @ApiOperation(value = "hello接口", notes = "shop测试接口")
    @GetMapping("/hello")
    public String test() {
        return "shop_你好";
    }


    @ApiOperation(value = "yuancheng接口", notes = "远程调用user的hello接口")
    @GetMapping("/yuancheng")
    public String test2() {
        return projectService.toUser();
    }
}
